﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/BaseInfoMaster.master"
    CodeFile="EditConsumerHis.aspx.cs" Inherits="EditConsumerHis" CodeFileBaseClass="Frame.Pages.BaseInfomationEditBasePage" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2.Linq, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Data.Linq" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<asp:Content ID="headContent" ContentPlaceHolderID="head" runat="server">
    <link type="text/css" rel="stylesheet" href="../Content/Site.css" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <h1 class="DemoTitle">
        消费记录管理
        <asp:HyperLink ID="BackLink" runat="server">返回</asp:HyperLink>
    </h1>
    <div id="DemoArea">
        <div class="Spacer" style="height: 14px;">
        </div>
        <dx:ASPxRoundPanel ID="Detailpanel" runat="server" Width="500px" HeaderText="客户基本信息"
            CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" EnableDefaultAppearance="False"
            GroupBoxCaptionOffsetX="6px" GroupBoxCaptionOffsetY="-19px" SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css">
            <ContentPaddings PaddingBottom="10px" PaddingLeft="7px" PaddingRight="11px" PaddingTop="10px" />
            <HeaderStyle>
                <Paddings PaddingBottom="6px" PaddingLeft="7px" PaddingRight="11px" PaddingTop="1px" />
            </HeaderStyle>
            <PanelCollection>
                <dx:PanelContent ID="PanelContent1" runat="server" SupportsDisabledAttribute="True">
                    <table width="100%" style="font-size: 10pt">
                        <tr>
                            <td style="white-space: nowrap">
                                客户姓名:
                            </td>
                            <td>
                                <dx:ASPxLabel Width="200px" ID="View_CName" Wrap="true" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                            <td style="white-space: nowrap">
                                手机号:
                            </td>
                            <td>
                                <dx:ASPxLabel Width="200px" ID="View_PhoneNum" Wrap="true" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td style="white-space: nowrap">
                                部门:
                            </td>
                            <td>
                                <dx:ASPxLabel Width="200px" ID="View_Department" Wrap="true" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                            <td style="white-space: nowrap">
                                性别:
                            </td>
                            <td>
                                <dx:ASPxLabel Width="200px" ID="View_Sex" Wrap="true" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td style="white-space: nowrap">
                                车牌/车名/颜色:
                            </td>
                            <td>
                                <dx:ASPxLabel Width="200px" ID="View_Car" Wrap="true" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                            <td style="white-space: nowrap">
                                重要客户:
                            </td>
                            <td>
                                <dx:ASPxLabel Width="200px" ID="View_IsVip" Wrap="true" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td style="white-space: nowrap">
                                关联单位:
                            </td>
                            <td>
                                <dx:ASPxLabel Width="200px" ID="View_RefrenceCompany_ID" Wrap="true" runat="server"
                                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                            <td style="white-space: nowrap">
                                职位，头衔:
                            </td>
                            <td>
                                <dx:ASPxLabel Width="200px" ID="View_Position" Wrap="true" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td style="white-space: nowrap">
                                单位名称:
                            </td>
                            <td colspan="3">
                                <dx:ASPxLabel Width="400px" ID="View_Company" Wrap="true" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td style="white-space: nowrap">
                                地址:
                            </td>
                            <td colspan="3">
                                <dx:ASPxLabel Width="400px" ID="View_Address" Wrap="true" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td style="white-space: nowrap">
                                喜好，口味:
                            </td>
                            <td colspan="3">
                                <dx:ASPxLabel Width="400px" ID="View_Favor" Wrap="true" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td style="white-space: nowrap">
                                备注:
                            </td>
                            <td colspan="3">
                                <dx:ASPxLabel Width="400px" ID="View_Remark" Wrap="true" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                    </table>
                </dx:PanelContent>
            </PanelCollection>
        </dx:ASPxRoundPanel>
        <div class="Spacer" style="height: 14px;">
        </div>
        <dx:ASPxGridView ID="gridView" runat="server" Width="100%" AutoGenerateColumns="False"
            CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" DataSourceID="LSMDSourceMain"
            KeyFieldName="BookNo" OnRowInserting="gridView_RowInserting">
            <Styles CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx">
                <Header ImageSpacing="5px" SortingImageSpacing="5px">
                </Header>
                <LoadingPanel ImageSpacing="5px">
                </LoadingPanel>
            </Styles>
            <ImagesFilterControl>
                <LoadingPanel Url="~/App_Themes/DevEx/GridView/Loading.gif">
                </LoadingPanel>
            </ImagesFilterControl>
            <Images SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css">
                <LoadingPanelOnStatusBar Url="~/App_Themes/DevEx/GridView/StatusBarLoading.gif">
                </LoadingPanelOnStatusBar>
                <LoadingPanel Url="~/App_Themes/DevEx/GridView/Loading.gif">
                </LoadingPanel>
            </Images>
            <Settings ShowPreview="true" />
            <Columns>
                <dx:GridViewDataTextColumn Name="t_BookNo" FieldName="BookNo" VisibleIndex="0" CellStyle-HorizontalAlign="Left"
                    Caption="订金单号">
                    <PropertiesTextEdit MaxLength="50" Native="true" Width="260px">
                        <ValidationSettings CausesValidation="true">
                            <RequiredField IsRequired="true" ErrorText="订金单号不可为空！"></RequiredField>
                        </ValidationSettings>
                    </PropertiesTextEdit>
                    <EditFormSettings CaptionLocation="Near"></EditFormSettings>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataDateColumn Name="t_ConsumerDate" FieldName="ConsumerDate" VisibleIndex="1"
                    CellStyle-HorizontalAlign="Center" Caption="消费时间">
                    <PropertiesDateEdit Width="260px">
                        <ValidationSettings CausesValidation="true">
                            <RequiredField IsRequired="true" ErrorText="消费时间不可为空！"></RequiredField>
                        </ValidationSettings>
                    </PropertiesDateEdit>
                    <EditFormSettings CaptionLocation="Near"></EditFormSettings>
                    <CellStyle HorizontalAlign="Center">
                    </CellStyle>
                </dx:GridViewDataDateColumn>
                <dx:GridViewDataComboBoxColumn Name="t_Period_ID" FieldName="Period_ID" VisibleIndex="2"
                    CellStyle-HorizontalAlign="Center" Caption="营业时段">
                    <PropertiesComboBox Native="true" Width="260px">
                        <ValidationSettings CausesValidation="true">
                            <RequiredField IsRequired="true" ErrorText="营业时段不可为空！"></RequiredField>
                        </ValidationSettings>
                    </PropertiesComboBox>
                    <CellStyle HorizontalAlign="Center">
                    </CellStyle>
                </dx:GridViewDataComboBoxColumn>
                <dx:GridViewDataTextColumn Name="t_Money" FieldName="Money" VisibleIndex="3" CellStyle-HorizontalAlign="Right"
                    Caption="金额">
                    <PropertiesTextEdit Width="260px">
                        <MaskSettings Mask="&lt;0..999999g&gt;.&lt;00..99&gt;" IncludeLiterals="DecimalSymbol">
                        </MaskSettings>
                        <ValidationSettings CausesValidation="true">
                            <RequiredField IsRequired="true" ErrorText="金额不可为空！"></RequiredField>
                        </ValidationSettings>
                    </PropertiesTextEdit>
                    <EditFormSettings CaptionLocation="Near"></EditFormSettings>
                    <CellStyle HorizontalAlign="Right">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
<%--                <dx:GridViewDataComboBoxColumn Name="t_ConsumeType_ID" FieldName="ConsumeType_ID"
                    VisibleIndex="4" CellStyle-HorizontalAlign="Right" Caption="结账方式">
                    <PropertiesComboBox Native="true" Width="260px">
                        <ValidationSettings CausesValidation="true">
                            <RequiredField IsRequired="true" ErrorText="结账方式不可为空！"></RequiredField>
                        </ValidationSettings>
                    </PropertiesComboBox>
                    <EditFormSettings CaptionLocation="Near"></EditFormSettings>
                    <CellStyle HorizontalAlign="Right">
                    </CellStyle>
                </dx:GridViewDataComboBoxColumn>--%>
                <dx:GridViewDataTextColumn Name="t_TableCount" FieldName="TableCount" VisibleIndex="5"
                    CellStyle-HorizontalAlign="Right" Caption="桌数">
                    <PropertiesTextEdit Native="true" Width="260px">
                        <MaskSettings Mask="&lt;0..999&gt;"></MaskSettings>
                    </PropertiesTextEdit>
                    <EditFormSettings CaptionLocation="Near"></EditFormSettings>
                    <CellStyle HorizontalAlign="Right">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataMemoColumn Name="t_Remark" Visible="false" FieldName="Remark" VisibleIndex="6"
                    CellStyle-HorizontalAlign="Left" Caption="备注">
                    <PropertiesMemoEdit Width="300px" Height="100px">
                    </PropertiesMemoEdit>
                    <EditFormSettings Visible="True" CaptionLocation="Near"></EditFormSettings>
                    <CellStyle HorizontalAlign="Left">
                    </CellStyle>
                </dx:GridViewDataMemoColumn>
                <dx:GridViewDataTextColumn Name="t_D_BookNo" FieldName="BookNo" VisibleIndex="5"
                    HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Center" Caption="管理消费餐位明细">
                    <DataItemTemplate>
                        <asp:LinkButton ID="lbDetail" runat="server" CommandArgument='<%# Eval("BookNo") %>'
                            OnClick="lbDetail_Click">管理明细</asp:LinkButton>
                    </DataItemTemplate>
                    <EditFormSettings Visible="False" CaptionLocation="Near"></EditFormSettings>
                    <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                    <CellStyle HorizontalAlign="Center">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
            </Columns>
            <Templates>
                <PreviewRow>
                    备注：<%# Eval("Remark") %></PreviewRow>
            </Templates>
            <StylesEditors ButtonEditCellSpacing="0">
                <ProgressBar Height="21px">
                </ProgressBar>
            </StylesEditors>
            <SettingsEditing EditFormColumnCount="1" />
        </dx:ASPxGridView>
        <dx:LinqServerModeDataSource ID="LSMDSourceMain" runat="server" EnableDelete="true"
            EnableUpdate="true" EnableInsert="true" ContextTypeName="DAL.CMSDALDataContext"
            TableName="BLI_ConsumerHis" />
    </div>
</asp:Content>
